package com.wzcl.app.dao.model;

import com.wzcl.app.dao.model.common.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;

@Data
@Entity
@ApiModel(value = "商品规格")
@Table(name = "Specifications",
        indexes = {
                @Index(columnList = "commodityId"),
                @Index(columnList = "spec")
        }
)
public class Specifications implements Base {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @ApiModelProperty(value = "关联的商品")
    private Integer commodityId;

    @ApiModelProperty(value = "属性JSON")
    private String spec;

    @ApiModelProperty(value = "价格")
    private BigDecimal price;
}
